package com.hyd.mall.tiny.component;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 订单超时取消并解锁库存定时器
 *
 * @author ayiyaha
 */
@Component
public class OrderTimeOutCancelTask {
	private Logger LOGGER = LoggerFactory.getLogger(OrderTimeOutCancelTask.class);

	@Scheduled(cron = "0 0/10 * ? * ?")
	private void cancelTimeOutOrder() {
		// TODO: 2021/7/10 此处应调用取消订单的方法，具体查看mall项目源码
		LOGGER.info("取消订单，并根据sku编号释放锁定库存");
	}
}
